#ifdef USBCON

#include "usbd_if.h"
#include "usbd_cdc_if.h"

void USBHD_ClockCmd(UINT32 RCC_USBCLKSource, FunctionalState NewState)
{
	RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, NewState);
	EXTEN->EXTEN_CTR |= EXTEN_USBHD_IO_EN;
	RCC_USBCLKConfig(RCC_USBCLKSource);             //USBclk=PLLclk/1.5=48Mhz
	RCC_AHBPeriphClockCmd(RCC_AHBPeriph_USBHD,NewState);
}

#ifdef USBD_USE_CDC
void USBD_CDC_init(void)
{
    CDC_init();
}
#endif /* USBD_USE_CDC */

void __func_interrupt USBHD_IRQHandler(void)
{
    USB_DevTransProcess();
}

WEAK void USB_DevTransProcess()
{
#ifdef USBD_USE_CDC
    CDC_DevTransProcess();
#endif
}

#endif